Vue.js: Learn By Coding by Scott Hughes

Vue.js: Learn By Coding by Scott Hughes

Author:Scott Hughes [Hughes, Scott]
Language: eng
Format: azw3
Published: 2018-02-17T16:00:00+00:00


To make our form, we're going to use Bootstrap's modal component. We could build a modal component in Vue. (There's actually an official example you can look at here: https://vuejs.org/v2/examples/modal.html.) But I like Bootstrap's modal component.

Anyway, let's get started. We'll start by creating a new Vue component called "purchases-form", and using the "Live demo" code from Bootstrap's website as the template and wrapping it in a div tag. Here is the code:

Vue.component('purchases-form', {

template: `

<div>

<!-- Button trigger modal -->

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">

Launch demo modal

</button>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.